///PHILOTES Source Code.  (C)2012 PhiloLabs
#pragma once

#ifndef _Rectangle2D_H__
#define _Rectangle2D_H__

#include "OgrePrerequisites.h"

#include "OgreSimpleRenderable.h"

namespace Ogre {

	
    class _OgreExport Rectangle2D : public SimpleRenderable
    {
    protected:
        
        void getWorldTransforms( Matrix4* xform ) const;

        void _initRectangle2D(bool includeTextureCoords, Ogre::HardwareBuffer::Usage vBufUsage);

    public:

        Rectangle2D(bool includeTextureCoordinates = false, HardwareBuffer::Usage vBufUsage = HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY);
        Rectangle2D(const String& name, bool includeTextureCoordinates = false, HardwareBuffer::Usage vBufUsage = HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY);
        ~Rectangle2D();

        
        void setCorners(Real left, Real top, Real right, Real bottom, bool updateAABB = true);

		
		void setNormals(const Vector3 &topLeft, const Vector3 &bottomLeft, const Vector3 &topRight, const Vector3 &bottomRight);

		
		void setUVs( const Vector2 &topLeft, const Vector2 &bottomLeft,
					 const Vector2 &topRight, const Vector2 &bottomRight);

		void setDefaultUVs();

        Real getSquaredViewDepth(const Camera* cam) const
        { (void)cam; return 0; }

        Real getBoundingRadius(void) const { return 0; }

    };
	
	

}// namespace

#endif


